<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
  <title>Loding...</title>
  <script src="/bower_components/jquery/dist/jquery.min.js"></script>
  <script src="/dist/js/store.min.js"></script>
  <script>
      $(function () {
          $.ajax({
              type : 'POST',
              url : "/lmgame/user/info",
              // data : $("#dataForm").serialize(),
              dataType : "json",
              success: function(data) {
                  if(data.code == 0){
                      store.set("user_info",data.data);
                      //跳转首页
                      if(data.data.aid != null){
                          window.location.href = "/pages/setting.html";
                      }else if(data.data.sid != null){
                          window.location.href = "/pages/channel/home.html";
                      }else{
                          window.location.href = "/pages/channel/login.html";
                      }
                  } else {
                      let usertType = store.get("userType");
                      if(usertType===1){
                          window.location.href = "/pages/admin/login.html";
                      }else{
                          window.location.href = "/pages/channel/login.html";
                      }
                  }
              },
              error: function (xhr) {
                  //跳转登录
                  window.location.href = "/pages/channel/login.html";
              }
          });
      })
  </script>
</head>
<body>

</body>
</html>